package com.sinry.api.client.feign.message;

import com.sinry.api.client.interceptors.FeignRequestInterceptor;
import com.sinry.message.enums.RabbitQueue;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author linxinlei
 * @project sinry-cloud
 * @description 消息接口
 * @date 2022/8/8
 **/
@FeignClient(name = "sinry-middleware-message", path = "/producer", configuration = FeignRequestInterceptor.class)
public interface MessageClient {

    @PostMapping("/{rabbitQueue}/send")
    void send(@PathVariable("rabbitQueue") RabbitQueue rabbitQueue, @RequestBody Object data);
}
